-- GENERATED SPELL FOR [Fathom-Guard Sharkkis] --


function spell0_21966(pUnit, Event) --@Blessing of the Tides,n/a--
pUnit:FullCastSpellOnTarget(38449,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21966', 542, 1)
end

function spell1_21966(pUnit, Event) --@Hurl Trident,n/a--
pUnit:FullCastSpellOnTarget(38374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21966', 607, 1)
end

function spell2_21966(pUnit, Event) --@Leeching Throw,n/a--
pUnit:FullCastSpellOnTarget(29436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21966', 12250, 1)
end

function spell3_21966(pUnit, Event) --@Multi-Toss,n/a--
pUnit:FullCastSpellOnTarget(38366,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21966', 611, 1)
end

function spell4_21966(pUnit, Event) --@Power of Sharkkis,n/a--
pUnit:FullCastSpellOnTarget(38455,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21966', 0, 1)
end

function spell5_21966(pUnit, Event) --@Summon Fathom Lurker,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(38433,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_21966', 1, 1)
end

function spell6_21966(pUnit, Event) --@Summon Fathom Sporebat,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(38431,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_21966', 1, 1)
end

function spell7_21966(pUnit, Event) --@The Beast Within,Self--
pUnit:FullCastSpellOnTarget(38373,pUnit)
pUnit:RegisterEvent('Sorts_21966', 18336, 1)
end

function Sorts_21966(pUnit, Event)
local choix_sorts_21966 = math.random(0, 7)
if choix_sorts_21966 == 0 then
pUnit:RegisterEvent('spell0_21966', 1, 1)
end
if choix_sorts_21966 == 1 then
pUnit:RegisterEvent('spell1_21966', 1, 1)
end
if choix_sorts_21966 == 2 then
pUnit:RegisterEvent('spell2_21966', 1, 1)
end
if choix_sorts_21966 == 3 then
pUnit:RegisterEvent('spell3_21966', 1, 1)
end
if choix_sorts_21966 == 4 then
pUnit:RegisterEvent('spell4_21966', 1, 1)
end
if choix_sorts_21966 == 5 then
pUnit:RegisterEvent('spell5_21966', 1, 1)
end
if choix_sorts_21966 == 6 then
pUnit:RegisterEvent('spell6_21966', 1, 1)
end
if choix_sorts_21966 == 7 then
pUnit:RegisterEvent('spell7_21966', 1, 1)
end
end

function mob21966_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21966', math.random(1500, 3000), 1)
end

function mob21966_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21966_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21966_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21966, 1, 'mob21966_Action')
RegisterUnitEvent(21966, 2, 'mob21966_Leave')
RegisterUnitEvent(21966, 3, 'mob21966_Kill')
RegisterUnitEvent(21966, 4, 'mob21966_Die')
